/****
 * @param obj OBJECT of HTML FORM
 * @return true/false
 */
function validate1(obj)
{
  var oUserName = obj.user_name;
  var oHiddenGender = obj.hiddenGender;
  var oCountry = obj.country;

  if(oUserName.value == ''){
    alert("username should not be blank..");
    oUserName.focus();
    return false;
  }
  if(oUserName.value.length < 6){
    alert("username should 6 char long..");
    oUserName.focus();
    oUserName.select();
    return false;
  }
  if(oHiddenGender.value == ''){
    alert("Please select any Gender");
    return false;
  }
  if(oCountry.value == ''){
    alert("Please select any Country");
    return false;
  }


  return false;
}


function validate(obj)
{
  var hobbies = document.getElementsByName('hobbies[]');
  count = 0;
  minCheck = 2;
  //alert(hobbies.length);
  for (var i = 0; i < hobbies.length; i++)
  {
    if(hobbies[i].checked == true){
      count++;
    }
  }

  if(count < minCheck){
    alert("Please check atleast "+minCheck+" hobbies" );
    return false;
  }
}
